#!/bin/bash
BASE_PATH=$(cd `dirname $0`;pwd)
echo "base_path is $BASE_PATH"

cd $BASE_PATH

make

ip=`ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'`

echo $ip
echo "start..."

port='8080'
uname='yim'

killall test

./test $ip $uname $port